<?php
declare (strict_types = 1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class UserMoneyLog extends Model
{	


	 public function userInfo()
    {
        return $this->hasone("user", 'u_id', "u_id");
    }



    public static function getOpType($int = 0)
    {
        $res = [
            1 => __('recharge'),
            2 => __('withdrawal'),
            3 => __('task deduction'),
            4 => __('task reward'),
            5 => __('return'),
            6 => __('balance'),
        ];


        return $int > 0 ? $res[$int] : $res;
    }
}
